package com.fzy.auth.action;

import java.util.List;

import com.fzy.auth.query.UserListQuery;
import com.fzy.auth.service.UserService;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;

public class UserListAction extends ActionSupport implements ModelDriven, Preparable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1749240209994548252L;

	List list;
	UserListQuery userListQuery;
    UserService userService;

	public String execute() throws Exception {
		list = userService.list2(userListQuery);
		return "dispatcher:/WEB-INF/jsp/auth/user-list.jsp";
    }

	public void prepare() throws Exception {
		userListQuery = new UserListQuery();
		userListQuery.setName("请。。");
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public Object getModel() {
		return userListQuery;
	}

	public List getList() {
		return list;
	}
	
}
